from openpyxl import load_workbook

wb = load_workbook("InputData.xlsx")
print(wb.sheetnames)
ws = wb.worksheets[1]

# for i in ws["2"]:
#     print(i.value)

# print(ws["2"][0].value)
Type=""
Type2=""
Type3=""
TypeL1=[]
for i in range(69):

    if(ws[i+2][3].value=="I"):
        Type="1"
    else:
        if(ws[i+2][3].value=="D"):
            Type="0"
        else:
            Type="2"
    if (ws[i + 2][4].value == "I"):
        Type2 = "1"
    else:
        if (ws[i + 2][4].value == "D"):
            Type2 = "0"
        else:
            Type2 = "2"

    if (ws[i + 2][5].value == "W"):
        Type3 = "3"
    else:

        Type3 = "4"

    TypeL1.append(Type+Type2+Type3)

print(TypeL1)
indexType=0
for i in range(69):
    ws["H%d"%(i+2)]=TypeL1[indexType]
    indexType+=1

wb.save("InputData.xlsx")
